from info_collect import db


class Teacher(db.Model):

    id = db.Column(db.String(36), primary_key=True)
    firstname = db.Column(db.String(24), index=True)
    lastname = db.Column(db.String(24), index=True)
    email = db.Column(db.String(64), index=True, unique=True)
    phone = db.Column(db.String(18), index=True, unique=True)
    wechat = db.Column(db.String(24), index=True, unique=True)

    def __init__(self, id):
        self.id = id

    def __repr__(self):
        return '<Teacher %r, name: %r, %r>' % (self.id, self.lastname, self.firstname)